﻿using System;

namespace ExoticCarRental
{
    class BusinessLayer
    {
        /// <summary>
        /// Logins the customer into the site.
        /// </summary>
        /// <param name="email"></param>
        /// <param name="password"></param>
        /// <returns>integer
        /// 0 for success, 
        /// 1 for failure login, 
        /// 2 failure password, 
        /// 3 failure both login and passsword
        /// </returns>
        public int LoginCustomer(string email, string password)
        {
            //AccessConnection conn = new AccessConnection();
            //DataTable dt = new DataTable();
            //string sql = "Select * from login where username='" + username +
            //    "' and password='" + password + "'";
            //dt = conn.ExecuteSelect(sql);
            //int count = dt.Rows.Count;
            //if (count == 0)
            //    return false;
            //else
            //    return true;
        }

        /// <summary>
        /// Logins the agent into the application.
        /// </summary>
        /// <param name="login"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public int LoginAgent(string login, string password)
        {
            //AccessConnection conn = new AccessConnection();
            //DataTable dt = new DataTable();
            //string sql = "Select * from login where username='" + username +
            //    "' and password='" + password + "'";
            //dt = conn.ExecuteSelect(sql);
            //int count = dt.Rows.Count;
            //if (count == 0)
            //    return false;
            //else
            //    return true;
        }

    }
}
